|
|
|
|
|
|
|
txtSourceFile.Text = dlgFileSelect.filename
End Sub |
|
|
|
|
|
|
|
|
Although you have to insert several lines of code to perform the same function as the Common Dialog control, the actual execution of the object to display the dialog box is more efficient than the control. When working with this object, you can see what the different methods and properties are by using Visual Basic's Object Browser (see Figure 2.12). Also, when you're adding the code to your project, the objects references are included in the Auto List Members feature of the code editor (see Figure 2.13). |
|
|
|
|
|
|
|
|
Note Using the Dialog Automation Objects will also reduce the size of your final application program; in addition, you do not have to distribute the Common Dialog control with your application, reducing the number of files on the disks or CD. |
|
|
|
|
|
|
|
|
|
Figure 2.12.
The Dialog Automation Objects methods and properties in the Object Browser. |
|
|
|
|
|